$(function () {
    for (var a = $(".friendlinks dd"), d = function () {
        var b = Math.floor(a.length * Math.random()), b = a.slice(b, b + 1);
        a = a.not(b[0]);
        return b
    }, c = 0; 8 > c; c++)d();
    a.css({position:"absolute", left:"-4000px"});
    $(".header-search-button").bind("click", function () {
        var b = $(this).closest("form"), a = $(".search-input-keyword"), c = a.val(), c = $.guang.util.trim(c);
        if ("搜一下,哇哦更懂你～" == c)return a.val(""), a.focus(), !1;
        if ("" == c)return a.focus(), !1;
        b.submit()
    });
    $(".search-input-keyword").bind("click",
        function () {
            var b = $(this);
            "搜一下,哇哦更懂你～" == $.guang.util.trim(b.val()) && b.val("")
        });
    $(".search-input-keyword").bind("keydown", function (b) {
        var b = b.which, a = $(this);
        a.css("color", "#fff");
        $(".header-search-button").css("opacity", "1");
        var c = a.closest("form"), d = a.val(), d = $.guang.util.trim(d);
        if ("13" == b) {
            if ("" == d)return a.focus(), !1;
            c.submit()
        }
    });
    $(".search-input-keyword").bind("blur", function () {
        var a = $(this);
        "" == $.guang.util.trim(a.val()) && a.val("搜一下,哇哦更懂你～")
    });
    $(".header-nav-search").bind("click", function () {
        $(".search-input-keyword").val("");
        $(document).scrollTop(0);
        $(".search-input-keyword").focus()
    })
});
function followGuang(a, d, c, b, e) {
    if (444 == a)return alert(d), !1;
    if ("3" != c && "4" != c && "5" != c || "true" == b || "n" == jQuery.cookie("noMoreTip"))return e && window.location.reload(), !1;
    d = a = "";
    "3" == c ? (a = "sinaBd", d = '<iframe width="63" height="24" frameborder="0" allowtransparency="true" marginwidth="0" marginheight="0" scrolling="no" border="0" src="http://widget.weibo.com/relationship/followbutton.php?language=zh_cn&width=63&height=24&uid=2439301091&style=1&btn=red&dpc=1"></iframe>') : "4" == c ? (a = "qzoneBd", d = '<iframe src="http://open.qzone.qq.com/like?url=http%3A%2F%2Fuser.qzone.qq.com%2F2408899511&type=button&width=400&height=30&style=2" allowtransparency="true" scrolling="no" border="0" frameborder="0" style="width:65px;height:30px;border:none;overflow:hidden;"></iframe>') :
        "5" == c && (a = "tencentBd", d = '<iframe src="http://follow.v.t.qq.com/index.php?c=follow&a=quick&name=iguang2011&style=5&t=1336569088774&f=0" frameborder="0" scrolling="auto" width="125" height="24" marginwidth="0" marginheight="0" allowtransparency="true"></iframe>');
    $("#followDialog")[0] || ($("body").append('<div id="followDialog" class="g-dialog"><div class="dialog-content"><div class="hd"><h3></h3></div>' + ('<div class="bd clearfix ' + a + '">') + '<div class="btnFrame">' + d + '</div></div><i></i><label><input type="checkbox" class="check" name="noMore" />不再提示</label><a class="close" href="javascript:;"></a></div></div>'),
        $("#loginDialog:visible")[0] && ($("#loginDialog").empty().remove(), $("#exposeMask").empty().remove()), $("#followDialog").overlay({top:"center", mask:{color:"#000", loadSpeed:200, opacity:0.3}, closeOnClick:!1, load:!0}), $("#followDialog").overlay().getClosers().bind("click", function () {
        $("input[name=noMore]")[0].checked && jQuery.cookie("noMoreTip", "n");
        e && window.location.reload()
    }))
}
;
